package com.carlinfo.hospital.service.impl;

import com.carlinfo.hospital.dao.impl.MedicineDaoImpl;
import com.carlinfo.hospital.pojo.Medicine;
import com.carlinfo.hospital.service.MedicineService;
import com.carlinfo.hospital.util.PageInfoUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class MedicineServiceImpl implements MedicineService{
    @Autowired
    private MedicineDaoImpl medicineDao;

    @Override
    public int saveOneDao(Medicine medicine) {
        return this.medicineDao.saveOneDao(medicine);
    }

    @Override
    public List<Medicine> selectListDao(PageInfoUtil pageInfoUtil, Map<String, Object> condMap) {
        return this.medicineDao.selectListDao(pageInfoUtil,condMap);
    }

    @Override
    public Medicine selectOneDao(Map<String, Object> condMap) {
        return this.medicineDao.selectOneDao(condMap);
    }

    @Override
    public int updateOneDao(Medicine medicine) {
        return this.medicineDao.updateOneDao(medicine);
    }

    @Override
    public int deleteOneDao(Map<String, Object> condMap) {
        return this.medicineDao.deleteOneDao(condMap);
    }
}
